# -*- coding: utf-8 -*-
#
# File: Oportunidade.py
#
# Copyright (c) 2008 by TcheZope.org
# Generator: ArchGenXML Version 2.0-beta9
#            http://plone.org/products/archgenxml
#
# GNU General Public License (GPL)
#

__author__ = """Fabiano Weimar dos Santos <xiru@xiru.org>, Jean Rodrigo Ferri
<jeanrodrigoferri@yahoogroups.com>, Rafahela Bazzanella
<rafabazzanella@yahoo.com.br>"""
__docformat__ = 'plaintext'

from AccessControl import ClassSecurityInfo
from Products.Archetypes.atapi import *
from zope.interface import implements
import interfaces
from Products.PloneZopista.Divulgacao import Divulgacao
from Products.CMFDynamicViewFTI.browserdefault import BrowserDefaultMixin

from Products.PloneZopista.config import *

# additional imports from tagged value 'import'
from DateTime import DateTime

##code-section module-header #fill in your manual code here
##/code-section module-header

schema = Schema((

    DateTimeField(
        name='data_inicio',
        widget=DateTimeField._properties['widget'](
            label="Data de Inicio",
            description="Informe a data em que entra em vigor esta oportunidade.",
            label_msgid='PloneZopista_label_data_inicio',
            description_msgid='PloneZopista_help_data_inicio',
            i18n_domain='PloneZopista',
        ),
        languageIndependent=True,
        accessor="start",
        default_method=DateTime,
    ),
    DateTimeField(
        name='data_termino',
        widget=DateTimeField._properties['widget'](
            label="Data de Termino",
            description="Informe a data em que expira esta oportunidade.",
            label_msgid='PloneZopista_label_data_termino',
            description_msgid='PloneZopista_help_data_termino',
            i18n_domain='PloneZopista',
        ),
        languageIndependent=True,
        accessor="end",
        default_method=DateTime,
    ),
),
)

##code-section after-local-schema #fill in your manual code here
##/code-section after-local-schema

Oportunidade_schema = BaseSchema.copy() + \
    getattr(Divulgacao, 'schema', Schema(())).copy() + \
    schema.copy()

##code-section after-schema #fill in your manual code here
##/code-section after-schema

class Oportunidade(Divulgacao, BaseContent, BrowserDefaultMixin):
    """
    """
    security = ClassSecurityInfo()
    implements(interfaces.IOportunidade)

    meta_type = 'Oportunidade'
    _at_rename_after_creation = True

    schema = Oportunidade_schema

    ##code-section class-header #fill in your manual code here
    ##/code-section class-header

    # Methods


registerType(Oportunidade, PROJECTNAME)
# end of class Oportunidade

##code-section module-footer #fill in your manual code here
##/code-section module-footer



